import tkinter as tk
#参考https://pythonguides.com/python-tkinter-panel/
win = tk.Tk()
win.geometry("400x300")
p1 = tk.PanedWindow(win,orient=tk.HORIZONTAL)
l = tk.Button(p1,text="bili")
ll =tk.Button(p1,text="凿寂")
p1.add(l)
p1.add(ll)
p1.grid(column=0,row=0,sticky="wnse")
win.columnconfigure(0,weight=1)
win.rowconfigure(0,weight=1)

win.mainloop()